100
|
How do I enable the cross link support ( rectangular )
![](images/exsurfaceq100.png)
with Surface1 do
begin
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(0),OleVariant(76));
with Add('Element <sha ;;0>C',OleVariant(-76),OleVariant(32)) do
begin
AutoSize := False;
Height := 32;
end;
with Add('Element <sha ;;0>D',OleVariant(76),OleVariant(32)) do
begin
AutoSize := False;
Height := 32;
end;
end;
with Links do
begin
with Add(Surface1.Elements.Item[OleVariant(1)],Surface1.Elements.Item[OleVariant(2)],Null) do
begin
StartPos := EXSURFACELib_TLB.CenterAlignment;
EndPos := EXSURFACELib_TLB.CenterAlignment;
end;
with Add(Surface1.Elements.Item[OleVariant(2)],Surface1.Elements.Item[OleVariant(1)],Null) do
begin
StartPos := EXSURFACELib_TLB.CenterAlignment;
EndPos := EXSURFACELib_TLB.CenterAlignment;
end;
Add(Surface1.Elements.Item[OleVariant(3)],Surface1.Elements.Item[OleVariant(4)],Null);
with Add(Surface1.Elements.Item[OleVariant(4)],Surface1.Elements.Item[OleVariant(3)],Null) do
begin
StartPos := EXSURFACELib_TLB.LeftAlignment;
EndPos := EXSURFACELib_TLB.RightAlignment;
end;
end;
ShowLinks := Integer(EXSURFACELib_TLB.exShowCrossLinksRect) Or Integer(EXSURFACELib_TLB.exShowExtendedLinks);
end
|
99
|
How do I show a link frmo bottom to top, or reverse, not from left to right
![](images/exsurfaceq99.png)
with Surface1 do
begin
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(0),OleVariant(64));
end;
with Links do
begin
with Add(Surface1.Elements.Item[OleVariant(1)],Surface1.Elements.Item[OleVariant(2)],Null) do
begin
StartPos := EXSURFACELib_TLB.CenterAlignment;
EndPos := EXSURFACELib_TLB.CenterAlignment;
end;
end;
end
|
98
|
What options to align the elements do I have if I use Arrange method
![](images/exsurfaceq98.png)
with Surface1 do
begin
BeginUpdate();
ShowGridLines := True;
with Elements do
begin
h1 := Add('Top Alignment',Null,Null).ID;
Add('Element',Null,Null);
Add('Element',Null,Null);
Add('Element',Null,Null);
h2 := Add('Center Alignment',Null,OleVariant(96)).ID;
Add('Element',Null,OleVariant(96));
Add('Element',Null,OleVariant(96));
Add('Element',Null,OleVariant(96));
h3 := Add('Bottom Alignment',Null,OleVariant(178)).ID;
Add('Element',Null,OleVariant(192));
Add('Element',Null,OleVariant(192));
Add('Element',Null,OleVariant(192));
end;
with Links do
begin
Add(Surface1.Elements.Item[OleVariant(1)],Surface1.Elements.Item[OleVariant(2)],Null);
Add(Surface1.Elements.Item[OleVariant(1)],Surface1.Elements.Item[OleVariant(3)],Null);
Add(Surface1.Elements.Item[OleVariant(2)],Surface1.Elements.Item[OleVariant(4)],Null);
Add(Surface1.Elements.Item[OleVariant(2)],Surface1.Elements.Item[OleVariant(3)],Null);
Add(Surface1.Elements.Item[OleVariant(5)],Surface1.Elements.Item[OleVariant(6)],Null);
Add(Surface1.Elements.Item[OleVariant(5)],Surface1.Elements.Item[OleVariant(7)],Null);
Add(Surface1.Elements.Item[OleVariant(6)],Surface1.Elements.Item[OleVariant(8)],Null);
Add(Surface1.Elements.Item[OleVariant(6)],Surface1.Elements.Item[OleVariant(7)],Null);
Add(Surface1.Elements.Item[OleVariant(9)],Surface1.Elements.Item[OleVariant(10)],Null);
Add(Surface1.Elements.Item[OleVariant(9)],Surface1.Elements.Item[OleVariant(11)],Null);
Add(Surface1.Elements.Item[OleVariant(10)],Surface1.Elements.Item[OleVariant(12)],Null);
Add(Surface1.Elements.Item[OleVariant(10)],Surface1.Elements.Item[OleVariant(11)],Null);
end;
DefArrange[EXSURFACELib_TLB.exDefArrangeAlign] := OleVariant(0);
Arrange(OleVariant(h1));
DefArrange[EXSURFACELib_TLB.exDefArrangeAlign] := OleVariant(1);
Arrange(OleVariant(h2));
DefArrange[EXSURFACELib_TLB.exDefArrangeAlign] := OleVariant(2);
Arrange(OleVariant(h3));
EndUpdate();
end
|
97
|
Is there an auto-arrange feature that will display the flow-chart centered and zoomed correctly after we are finished building it
![](images/exsurfaceq97.png)
with Surface1 do
begin
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',Null,Null).ID := 'B';
Add('Element C',Null,Null).ID := 'C';
Add('Element D',Null,Null).ID := 'D';
end;
with Links do
begin
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['B'],Null);
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['C'],Null);
Add(Surface1.Elements.Item['B'],Surface1.Elements.Item['D'],Null);
Add(Surface1.Elements.Item['B'],Surface1.Elements.Item['C'],Null);
end;
Arrange(Null);
end
|
96
|
Is it possible to change the distance between elements, when calling the Arrange method
![](images/exsurfaceq96.png)
with Surface1 do
begin
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',Null,Null).ID := 'B';
Add('Element C',Null,Null).ID := 'C';
Add('Element D',Null,Null).ID := 'D';
end;
with Links do
begin
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['B'],Null);
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['C'],Null);
Add(Surface1.Elements.Item['B'],Surface1.Elements.Item['D'],Null);
Add(Surface1.Elements.Item['B'],Surface1.Elements.Item['C'],Null);
end;
DefArrange[EXSURFACELib_TLB.exDefArrangeDX] := OleVariant(0);
DefArrange[EXSURFACELib_TLB.exDefArrangeDY] := OleVariant(0);
Arrange(Null);
end
|
95
|
How do I organize vertically the elements
![](images/exsurfaceq95.png)
with Surface1 do
begin
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',Null,Null).ID := 'B';
Add('Element C',Null,Null).ID := 'C';
Add('Element D',Null,Null).ID := 'D';
end;
with Links do
begin
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['B'],Null);
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['C'],Null);
Add(Surface1.Elements.Item['B'],Surface1.Elements.Item['D'],Null);
Add(Surface1.Elements.Item['B'],Surface1.Elements.Item['C'],Null);
end;
ShowLinksType := EXSURFACELib_TLB.exLinkStraight;
DefArrange[EXSURFACELib_TLB.exDefArrangeDir] := OleVariant(1);
Arrange(Null);
end
|
94
|
Is there a way to create a link which has the same start and end element
![](images/exsurfaceq94.png)
with Surface1 do
begin
with Elements do
begin
Add('Element',Null,Null);
end;
with Links do
begin
Add(Surface1.Elements.Item[OleVariant(1)],Surface1.Elements.Item[OleVariant(1)],Null);
end;
end
|
93
|
How can I prevent hiding the item when an item with an outgoing link, is collapsed
![](images/exsurfaceq93.png)
with Surface1 do
begin
with Elements do
begin
Add('Item <sha ;;0>1',Null,Null).ID := OleVariant(1);
Insert('Item <sha ;;0>2',OleVariant(1),Null).ID := OleVariant(2);
with Add('Item <sha ;;0>3',Null,Null) do
begin
ID := OleVariant(3);
X := 96;
Y := 23;
end;
end;
with Links do
begin
Add(Surface1.Elements.Item[OleVariant(2)],Surface1.Elements.Item[OleVariant(3)],Null);
end;
ShowLinksOnCollapse := True;
end
|
92
|
How can I change the toolbar's visual appearance
![](images/exsurfaceq92.png)
with Surface1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
Background[EXSURFACELib_TLB.exToolBarAppearance] := $1000000;
Background[EXSURFACELib_TLB.exToolBarBackColor] := $ffffff;
Background[EXSURFACELib_TLB.exToolBarForeColor] := $282828;
Background[EXSURFACELib_TLB.exToolBarButtonDownBackColor] := $1606060;
Background[EXSURFACELib_TLB.exToolBarButtonDownForeColor] := $f0f0f0;
Background[EXSURFACELib_TLB.exToolBarButtonHotBackColor] := $1a0a0a0;
Background[EXSURFACELib_TLB.exToolBarButtonHotForeColor] := $ffffff;
end
|
91
|
How can I change the toolbar's background color
![](images/exsurfaceq91.png)
with Surface1 do
begin
Background[EXSURFACELib_TLB.exToolBarBackColor] := $ffffff;
end
|
90
|
How can I fit or ensure that all elements are in the control's client area
with Surface1 do
begin
with Elements do
begin
Add('Element A',OleVariant(-500),OleVariant(-500)).BackColor := $ff00;
Add('Element B',OleVariant(500),OleVariant(500)).BackColor := $ff;
Add('Element C',OleVariant(48),OleVariant(24));
end;
FitToClient();
end
|
89
|
When I use the context menu to insert an image, the size seems to be fixed to 32 pixels. How can I control / change this
![](images/exsurfaceq89.png)
// CreateElement event - The user creates at runtime a new element.
procedure TForm1.Surface1CreateElement(ASender: TObject; Element : IElement);
begin
// Element.Edit(0,"multiline,wordwrap")
// Element.AutoSize = True
with Surface1 do
begin
OutputDebugString( 'Call Edit(0) method of the Element object' );
end
end;
// RClick event - Occurs once the user right clicks the control.
procedure TForm1.Surface1RClick(ASender: TObject; );
begin
// SelElement(0).Edit(0,"multiline,wordwrap")
with Surface1 do
begin
Selection := (IUnknown(ElementFromPoint[-1,-1]) as _TLB.Object);
OutputDebugString( 'Call Edit(0) method of the SelElement(0) property' );
end
end;
with Surface1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
VisualAppearance.Add(3,'c:\exontrol\images\hot.ebn');
Background[EXSURFACELib_TLB.exContextMenuAppearance] := $1000000;
Background[EXSURFACELib_TLB.exContextMenuSelBackColor] := $1fcddc0;
Background[EXSURFACELib_TLB.exElementBorderColor] := $3000000;
SelectObjectColor := RGB(192,221,252);
HTMLPicture['pic1'] := 'c:\exontrol\images\zipdisk.gif';
HTMLPicture['pic2'] := 'c:\exontrol\images\auction.gif';
HTMLPicture['pic3'] := 'c:\exontrol\images\colorize.gif';
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
with Add('Custom-size pictures:<br><img>pic1:24</img>,<img>pic2:48</img> ,... and so on.',OleVariant(96),OleVariant(48)) do
begin
ID := 'B';
CaptionSingleLine := EXSURFACELib_TLB.exCaptionWordWrap;
end;
Add('Element C',OleVariant(48),OleVariant(24));
end;
EditContextMenuItems := 'Size[id=57680][edittype=515][border=0][min=16][max=128][freq=16][editwidth=-128][ticklabel=value = %i ? ''<b>''+value : ( value = ' +
'vmax ? ''<fgcolor 808080><font ;6><b>''+value : ( value = vmin ? ''<fgcolor 808080><font ;6><b>''+value : '''' ) )],Insert[group=3](<i' +
'mg>pic1:32</img>[id=57763],<img>pic2:32</img>[id=57763],Others[id=1000](default[group=3](<img>pic3</img>[id=57763]),<font ;6>oth' +
'er sizes[sep],<img>pic3:16</img>[id=57763],<img>pic3:32</img>[id=57763],<img>pic3:64</img>[id=57763]))';
end
|
88
|
Can I add images to node while editing the node using the Edit method
![](images/exsurfaceq88.png)
// CreateElement event - The user creates at runtime a new element.
procedure TForm1.Surface1CreateElement(ASender: TObject; Element : IElement);
begin
// Element.Edit(0,"multiline,wordwrap")
// Element.AutoSize = True
with Surface1 do
begin
OutputDebugString( 'Call Edit(0) method of the Element object' );
end
end;
// RClick event - Occurs once the user right clicks the control.
procedure TForm1.Surface1RClick(ASender: TObject; );
begin
// SelElement(0).Edit(0,"multiline,wordwrap")
with Surface1 do
begin
Selection := (IUnknown(ElementFromPoint[-1,-1]) as _TLB.Object);
OutputDebugString( 'Call Edit(0) method of the SelElement(0) property' );
end
end;
with Surface1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
Background[EXSURFACELib_TLB.exContextMenuAppearance] := $1000000;
Background[EXSURFACELib_TLB.exContextMenuSelBackColor] := $10000ff;
SelectObjectStyle := EXSURFACELib_TLB.exNoLines;
SelectObjectColor := RGB(192,221,252);
HTMLPicture['pic1'] := 'c:\exontrol\images\zipdisk.gif';
HTMLPicture['pic2'] := 'c:\exontrol\images\auction.gif';
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
with Add('This is a node that displays pictures:<br><img>pic1:48</img>,<img>pic2:48</img> ,... and so on.',OleVariant(96),OleVariant(48)) do
begin
ID := 'B';
CaptionSingleLine := EXSURFACELib_TLB.exCaptionWordWrap;
end;
Add('Element C',OleVariant(48),OleVariant(24)).BackColor := $ffffff;
end;
end
|
87
|
I am using the Edit method to edit the node, but still not able to display multiple lines. Is this possible
![](images/exsurfaceq87.png)
// CreateElement event - The user creates at runtime a new element.
procedure TForm1.Surface1CreateElement(ASender: TObject; Element : IElement);
begin
// Element.Edit(0,"multiline,wordwrap")
// Element.AutoSize = True
with Surface1 do
begin
OutputDebugString( 'Call Edit(0) method of the Element object' );
end
end;
// RClick event - Occurs once the user right clicks the control.
procedure TForm1.Surface1RClick(ASender: TObject; );
begin
// SelElement(0).Edit(0,"multiline,wordwrap")
with Surface1 do
begin
Selection := (IUnknown(ElementFromPoint[-1,-1]) as _TLB.Object);
OutputDebugString( 'Call Edit(0) method of the SelElement(0) property' );
end
end;
with Surface1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
Background[EXSURFACELib_TLB.exContextMenuAppearance] := $1000000;
Background[EXSURFACELib_TLB.exContextMenuSelBackColor] := $10000ff;
SelectObjectStyle := EXSURFACELib_TLB.exNoLines;
SelectObjectColor := RGB(192,221,252);
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
with Add('Right-<b>Click</b> the node to edit it.',OleVariant(96),OleVariant(48)) do
begin
ID := 'B';
CaptionSingleLine := EXSURFACELib_TLB.exCaptionWordWrap;
end;
Add('Element C',OleVariant(48),OleVariant(24)).BackColor := $ffffff;
end;
end
|
86
|
How can I change the visual appearance of the edit's context menu
![](images/exsurfaceq86.png)
// CreateElement event - The user creates at runtime a new element.
procedure TForm1.Surface1CreateElement(ASender: TObject; Element : IElement);
begin
// Element.Edit(0)
// Element.AutoSize = True
with Surface1 do
begin
OutputDebugString( 'Call Edit(0) method of the Element object' );
end
end;
// RClick event - Occurs once the user right clicks the control.
procedure TForm1.Surface1RClick(ASender: TObject; );
begin
// SelElement(0).Edit(0)
with Surface1 do
begin
Selection := (IUnknown(ElementFromPoint[-1,-1]) as _TLB.Object);
OutputDebugString( 'Call Edit(0) method of the SelElement(0) property' );
end
end;
with Surface1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
Background[EXSURFACELib_TLB.exContextMenuAppearance] := $1000000;
Background[EXSURFACELib_TLB.exContextMenuSelBackColor] := $10000ff;
SelectObjectStyle := EXSURFACELib_TLB.exNoLines;
SelectObjectColor := RGB(192,221,252);
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Right-Click to edit this node',OleVariant(96),OleVariant(48)).ID := 'B';
Add('Element C',OleVariant(48),OleVariant(24)).BackColor := $ffffff;
end;
end
|
85
|
How can I edit the node once the user right-click the element
![](images/exsurfaceq85.png)
// CreateElement event - The user creates at runtime a new element.
procedure TForm1.Surface1CreateElement(ASender: TObject; Element : IElement);
begin
// Element.Edit(0)
// Element.AutoSize = True
with Surface1 do
begin
OutputDebugString( 'Call Edit(0) method of the Element object' );
end
end;
// RClick event - Occurs once the user right clicks the control.
procedure TForm1.Surface1RClick(ASender: TObject; );
begin
// SelElement(0).Edit(0)
with Surface1 do
begin
Selection := (IUnknown(ElementFromPoint[-1,-1]) as _TLB.Object);
OutputDebugString( 'Call Edit(0) method of the SelElement(0) property' );
end
end;
with Surface1 do
begin
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',OleVariant(96),OleVariant(48)).ID := 'B';
Add('Element C',OleVariant(48),OleVariant(24)).BackColor := $ffffff;
end;
end
|
84
|
I wish to return the name that is displayed in the Element that I have selected
![](images/exsurfaceq84.png)
// SelectionChanged event - Notifies your application that the control's selection has been changed.
procedure TForm1.Surface1SelectionChanged(ASender: TObject; );
begin
with Surface1 do
begin
OutputDebugString( 'The number of selected elements is: ' );
OutputDebugString( SelCount );
OutputDebugString( SelElement[0].Caption );
end
end;
with Surface1 do
begin
HideSel := False;
SelectObjectColorInactive := SelectObjectColor;
SelectObjectTextColorInactive := SelectObjectTextColor;
with Elements do
begin
Add('Element 1',Null,Null).Selected := True;
with Add('Element 2',Null,Null) do
begin
X := 32;
Y := 32;
end;
end;
end
|
83
|
Been playing with the surface control with the embedded ExGrid ActiveX...I can see most events coming through via the Surface control but I can't get the OnOLEStartDrag event to fire
![](images/exsurfaceq83.png)
// OleEvent event - Occurs once an inside control fires an event.
procedure TForm1.Surface1OleEvent(ASender: TObject; Element : IElement;Ev : IOleEvent);
begin
// Ev.Param(1).Value = 2
// Ev.Param(0).Value.SetData("items to be carried")
with Surface1 do
begin
OutputDebugString( Ev );
end
end;
with Surface1 do
begin
BeginUpdate();
with Elements do
begin
with InsertControl('Exontrol.Grid',Null,Null,Null) do
begin
ElementFormat := '"client"';
with (IUnknown(Object) as EXGRIDLib_TLB.Grid) do
begin
BeginUpdate();
OLEDropMode := 1;
Columns.Add('Default');
Items.AddItem('Click the item so it gets the focus');
EndUpdate();
end;
end;
end;
MoveCorner(EXSURFACELib_TLB.exMiddleCenter,EXSURFACELib_TLB.exTopLeft);
EndUpdate();
end
|
82
|
Is it possible to assign/add a percent to
an element
![](images/exsurfaceq82.png)
with Surface1 do
begin
with Elements do
begin
with Add('Element A',Null,Null) do
begin
ID := 'A';
CaptionAlign := EXSURFACELib_TLB.exTopCenter;
AutoSize := False;
Height := 36;
Width := 96;
MinHeight := 36;
BackgroundExt := 'none[(2,100%-15,100%-4,14)](left[50%,back=RGB(0,255,0),text=`15%`,align=0x11,pattern=6,frame])';
BackgroundExtValue[EXSURFACELib_TLB.exIndexExt2,EXSURFACELib_TLB.exClientExt] := '75%';
BackgroundExtValue[EXSURFACELib_TLB.exIndexExt2,EXSURFACELib_TLB.exTextExt] := BackgroundExtValue[EXSURFACELib_TLB.exIndexExt2,EXSURFACELib_TLB.exClientExt];
end;
end;
end
|
81
|
How can I disable selecting the nodes/elements
with Surface1 do
begin
AllowSelectObject := EXSURFACELib_TLB.exDisallow;
AllowSelectNothing := False;
AllowSelectObjectRect := EXSURFACELib_TLB.exDisallow;
AllowToggleSelectKey := EXSURFACELib_TLB.exDisallow;
end
|
80
|
How can I set my zooming levels on the control's toolbar
![](images/exsurfaceq80.png)
with Surface1 do
begin
ZoomLevels := '75,100,150,200';
AllowLinkObjects := EXSURFACELib_TLB.exDisallow;
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',OleVariant(96),OleVariant(24)).ID := 'B';
Add('Element C',OleVariant(48),OleVariant(12)).BackColor := $ffffff;
end;
end
|
79
|
How can I prevent zooming the surface
![](images/exsurfaceq79.png)
with Surface1 do
begin
AllowZoomSurface := EXSURFACELib_TLB.exDisallow;
AllowZoomWheelSurface := False;
ToolBarFormat := '-1,100';
end
|
78
|
How can I prevent adding the links
with Surface1 do
begin
AllowLinkObjects := EXSURFACELib_TLB.exDisallow;
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',OleVariant(96),OleVariant(24)).ID := 'B';
Add('Element C',OleVariant(48),OleVariant(12)).BackColor := $ffffff;
end;
end
|
77
|
How can I fix all elements on the surface, so no moving or resizing is allowed
![](images/exsurfaceq77.png)
with Surface1 do
begin
AllowResizeObject := EXSURFACELib_TLB.exDisallow;
AllowMoveObject := EXSURFACELib_TLB.exDisallow;
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',OleVariant(96),OleVariant(24)).ID := 'B';
Add('Element C',OleVariant(48),OleVariant(12)).BackColor := $ffffff;
end;
end
|
76
|
How can I link elements with no pressing the SHIFT key
with Surface1 do
begin
AllowInsertObject := False;
AllowLinkObjects := EXSURFACELib_TLB.exLeftClick;
AllowMoveObject := EXSURFACELib_TLB.exDisallow;
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',OleVariant(96),OleVariant(24)).ID := 'B';
Add('Element C',OleVariant(48),OleVariant(12)).BackColor := $ffffff;
end;
end
|
75
|
How can I disable creating the tree/hierarchies
with Surface1 do
begin
AllowInsertObject := False;
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',OleVariant(96),OleVariant(24)).ID := 'B';
Add('Element C',OleVariant(48),OleVariant(12)).BackColor := $ffffff;
end;
end
|
74
|
How can I create new elements using simple clicks rather than double clicks
![](images/exsurfaceq74.png)
with Surface1 do
begin
AllowCreateObject := EXSURFACELib_TLB.exLeftClick;
end
|
73
|
How can I disable creating new elements at runtime
with Surface1 do
begin
AllowCreateObject := EXSURFACELib_TLB.exDisallow;
end
|
72
|
I've noticed that the links cut the elements. Is it possible to show the links on the back
![](images/exsurfaceq72.png)
with Surface1 do
begin
ShowLinksType := EXSURFACELib_TLB.exLinkStraight;
ShowLinks := EXSURFACELib_TLB.exShowExtendedLinks;
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',OleVariant(96),OleVariant(24)).ID := 'B';
Add('Element C',OleVariant(48),OleVariant(12)).BackColor := $ffffff;
end;
with Links do
begin
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['B'],Null).Caption := 'link';
end;
end
|
71
|
How can I show a picture on the link
![](images/exsurfaceq71.png)
with Surface1 do
begin
HTMLPicture['pic1'] := 'c:\exontrol\images\zipdisk.gif';
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',OleVariant(96),OleVariant(24)).ID := 'B';
end;
with Links do
begin
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['B'],Null).Caption := '<img>pic1:24</img>';
end;
ShowLinksType := EXSURFACELib_TLB.exLinkStraight;
end
|
70
|
How can I show a caption on the link
![](images/exsurfaceq70.png)
with Surface1 do
begin
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',OleVariant(96),OleVariant(24)).ID := 'B';
end;
with Links do
begin
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['B'],Null).Caption := 'link';
end;
ShowLinksType := EXSURFACELib_TLB.exLinkStraight;
end
|
69
|
I am using EBN to show my arrows, the question is if I can make it bigger/larger
![](images/exsurfaceq69.png)
with Surface1 do
begin
with VisualAppearance do
begin
Add(1,'c:\exontrol\images\normal.ebn');
Add(2,'CP:1 -2 -2 2 2');
end;
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',OleVariant(96),OleVariant(24)).ID := 'B';
Add('Element C',OleVariant(96),OleVariant(-24)).ID := 'C';
end;
with Links do
begin
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['B'],Null);
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['C'],Null);
end;
LinksArrowColor := $2000000;
end
|
68
|
Is it possible to show different type of arrows for links
![](images/exsurfaceq68.png)
with Surface1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
with Elements do
begin
Add('Element A',Null,Null).ID := 'A';
Add('Element B',OleVariant(96),OleVariant(24)).ID := 'B';
Add('Element C',OleVariant(96),OleVariant(-24)).ID := 'C';
end;
with Links do
begin
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['B'],Null).ArrowColor := $ff;
Add(Surface1.Elements.Item['A'],Surface1.Elements.Item['C'],Null).ArrowColor := $1000000;
end;
end
|
67
|
How can I remove or clear the entire surface
with Surface1 do
begin
Elements.Add('element',Null,Null);
Elements.Clear();
Home();
end
|
66
|
How can I programmatically add a child element, or create a tree/hierarchy
![](images/exsurfaceq66.png)
with Surface1 do
begin
with Elements do
begin
Add('Root',Null,Null).ID := 'rootID';
Insert('Child 1','rootID',Null);
Insert('Child 2','rootID',Null).ID := 'childID';
Insert('Child 3','rootID',Null);
Insert('Sub-Child 1.2','childID',Null);
Insert('Sub-Child 2.2','childID',Null);
end;
end
|
65
|
I've noticed that the element's background is transparent. Can I make it opaque
![](images/exsurfaceq65.png)
with Surface1 do
begin
with Elements do
begin
Add('new 1',Null,Null).BackColor := $ffffff;
Add('new 1',OleVariant(24),OleVariant(24)).BackColor := $f0f0f0;
end;
end
|
64
|
How can I add a resizable element
with Surface1 do
begin
with Elements do
begin
with Add('new 1',Null,Null) do
begin
AutoSize := False;
Resizable := True;
end;
with Add('new 1',OleVariant(24),OleVariant(24)) do
begin
AutoSize := False;
Resizable := True;
end;
end;
end
|
63
|
How can I programmatically add a new element
![](images/exsurfaceq63.png)
with Surface1 do
begin
with Elements do
begin
Add('new 1',Null,Null);
Add('new 1',OleVariant(24),OleVariant(24));
end;
end
|
62
|
Is it possible to assign a tooltip to an element
![](images/exsurfaceq62.png)
with Surface1 do
begin
Elements.Add('Element with a Tooltip',Null,Null).ToolTip := 'This is a bit of text that should be displayed when cursor hovers the element.';
end
|
61
|
How do I specify direct/straight link for all links
![](images/exsurfaceq61.png)
with Surface1 do
begin
ShowLinksType := Integer(EXSURFACELib_TLB.exLinkStraight) Or Integer(EXSURFACELib_TLB.exLinkDirect);
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(96),OleVariant(24));
end;
with Links do
begin
Add(Surface1.Elements.Item[OleVariant(1)],Surface1.Elements.Item[OleVariant(2)],Null);
end;
end
|
60
|
How do I show a direct/straight link
![](images/exsurfaceq60.png)
with Surface1 do
begin
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(96),OleVariant(24));
end;
with Links do
begin
Add(Surface1.Elements.Item[OleVariant(1)],Surface1.Elements.Item[OleVariant(2)],Null).ShowLinkType := Integer(EXSURFACELib_TLB.exLinkStraight) Or Integer(EXSURFACELib_TLB.exLinkDirect);
end;
end
|
59
|
How can I ensure that a specified element fits the surface's visible area
![](images/exsurfaceq59.png)
with Surface1 do
begin
with Elements do
begin
with Add('Element A',OleVariant(-100),Null).Pattern do
begin
Type := EXSURFACELib_TLB.exPatternBDiagonal;
Color := $e0e0e0;
end;
Add('Element B',OleVariant(2000),Null).ScrollTo(EXSURFACELib_TLB.exMiddleCenter);
end;
end
|
58
|
Is it possible to show a pattern like ( not available ) over an element
![](images/exsurfaceq58.png)
with Surface1 do
begin
with Elements do
begin
with Add('Element+Pattern',OleVariant(-100),Null).Pattern do
begin
Type := EXSURFACELib_TLB.exPatternBDiagonal;
Color := $e0e0e0;
end;
Add('Element',OleVariant(100),Null);
end;
end
|
57
|
How can I specify a different overview color for the element
![](images/exsurfaceq57.png)
with Surface1 do
begin
with Elements do
begin
Add('Element+A',OleVariant(-100),Null).OverviewColor := $ff;
Add('Element+B',OleVariant(100),Null);
end;
ScrollPos[True] := 512;
end
|
56
|
I've noticed that some lines are shown on the border, how can I get ride of them
![](images/exsurfaceq56.png)
with Surface1 do
begin
with Elements do
begin
Add('Element+A',OleVariant(-100),Null);
Add('Element+B',OleVariant(100),Null);
end;
ScrollPos[True] := 512;
OverviewColor := $ffffffff;
end
|
55
|
How can I handle clicking an icon or a picture
![](images/exsurfaceq55.png)
// HandCursorClick event - The uses clicks a part of the element that shows the had cursor.
procedure TForm1.Surface1HandCursorClick(ASender: TObject; Element : IElement;Hit : ShowHandCursorOnEnum;Key : OleVariant);
begin
with Surface1 do
begin
OutputDebugString( Key );
end
end;
with Surface1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
HTMLPicture['pic1'] := 'c:\exontrol\images\zipdisk.gif';
HTMLPicture['pic2'] := 'c:\exontrol\images\auction.gif';
with Elements.Add('Caption',Null,Null) do
begin
Pictures := '1,2/pic1/pic2';
PicturesAlign := EXSURFACELib_TLB.exBottomCenter;
ShowHandCursorOn := Integer(EXSURFACELib_TLB.exShowHandCursorExtraPictures) Or Integer(EXSURFACELib_TLB.exShowHandCursorPictures) Or Integer(EXSURFACELib_TLB.exShowHandCursorIcon) Or Integer(EXSURFACELib_TLB.exShowHandCursorPicture);
CaptionAlign := EXSURFACELib_TLB.exTopCenter;
end;
end
|
54
|
How can I display a picture
![](images/exsurfaceq54.png)
with Surface1 do
begin
HTMLPicture['pic1'] := 'c:\exontrol\images\zipdisk.gif';
HTMLPicture['pic2'] := 'c:\exontrol\images\auction.gif';
Elements.Add('Element',Null,Null).Pictures := 'pic1/pic2';
end
|
53
|
How can I display a picture
![](images/exsurfaceq53.png)
with Surface1 do
begin
HTMLPicture['pic1'] := 'c:\exontrol\images\zipdisk.gif';
HTMLPicture['pic2'] := 'c:\exontrol\images\auction.gif';
Elements.Add('Icon <img>pic1</img> or <img>pic2</img>',Null,Null);
end
|
52
|
How can I display an icon
![](images/exsurfaceq52.png)
with Surface1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
Elements.Add('Element',Null,Null).Pictures := '0/1,2';
end
|
51
|
How can I display an icon
![](images/exsurfaceq51.png)
with Surface1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
Elements.Add('Icon <img>1</img> or <img>2</img>',Null,Null);
end
|
50
|
How can I prevent moving all descendent/outgoing elements when focused element is moved, more like a free move
with Surface1 do
begin
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(96),OleVariant(24));
end;
with Links do
begin
Add(Surface1.Elements.Item[OleVariant(1)],Surface1.Elements.Item[OleVariant(2)],Null);
end;
ShowLinksType := Integer(EXSURFACELib_TLB.exLinkStraight) Or Integer(EXSURFACELib_TLB.exLinkDirect);
AllowMoveDescendents := False;
end
|
49
|
How can I display the +/- expand/collapse glyphs next to linked elements
![](images/exsurfaceq49.png)
with Surface1 do
begin
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(96),OleVariant(24));
end;
with Links do
begin
Add(Surface1.Elements.Item[OleVariant(1)],Surface1.Elements.Item[OleVariant(2)],Null);
end;
Elements.Item[OleVariant(1)].Expanded := False;
ExpandLinkedElements := True;
end
|
48
|
How can I host the Exontrol.Button inside the surface
![](images/exsurfaceq48.png)
with Surface1 do
begin
with Elements do
begin
with Add('ActiveX',Null,Null) do
begin
Type := EXSURFACELib_TLB.exElementHostControl;
ElementFormat := '"check":18,"client"';
ShowCheckBox := True;
Control := 'Exontrol.Button';
(IUnknown(Object) as EXBUTTONLib_TLB.Button).Caption := '<sha ;;0>button';
Height := 32;
Width := 128;
end;
end;
end
|
47
|
How can I host a Command button
![](images/exsurfaceq47.png)
with Surface1 do
begin
with Elements do
begin
with InsertControl('Forms.CommandButton.1',Null,Null,Null) do
begin
ElementFormat := '"check":18,"client"';
(IUnknown(Object) as MSForms_TLB.CommandButton2).Caption := 'command';
ShowCheckBox := True;
Height := 48;
Width := 128;
end;
end;
end
|
46
|
How can I handle the events of the inner ActiveX control
![](images/exsurfaceq46.png)
// OleEvent event - Occurs once an inside control fires an event.
procedure TForm1.Surface1OleEvent(ASender: TObject; Element : IElement;Ev : IOleEvent);
begin
with Surface1 do
begin
OutputDebugString( Ev );
end
end;
with Surface1 do
begin
with Elements do
begin
with InsertControl('Forms.CommandButton.1',Null,Null,Null) do
begin
ElementFormat := '"check":18,"client"';
(IUnknown(Object) as MSForms_TLB.CommandButton2).Caption := 'command';
ShowCheckBox := True;
Height := 48;
Width := 128;
end;
end;
end
|
45
|
How can I display a checkbox while my node hosts an ActiveX inside
![](images/exsurfaceq45.png)
with Surface1 do
begin
with Elements do
begin
with InsertControl('Forms.CommandButton.1',Null,Null,Null) do
begin
ElementFormat := '"check":18,"client"';
(IUnknown(Object) as MSForms_TLB.CommandButton2).Caption := 'command';
ShowCheckBox := True;
Height := 48;
Width := 128;
end;
end;
end
|
44
|
Is it possible to display a caption while the element hosts an ActiveX control
![](images/exsurfaceq44.png)
with Surface1 do
begin
with Elements do
begin
with InsertControl('Forms.CommandButton.1',Null,Null,Null) do
begin
ElementFormat := '18;"caption"/"client"';
(IUnknown(Object) as MSForms_TLB.CommandButton2).Caption := 'command';
Caption := 'Forms.CommandButton';
CaptionAlign := EXSURFACELib_TLB.exTopCenter;
Height := 48;
Width := 128;
end;
end;
end
|
43
|
I host an ActiveX control but it does not cover the whole element. What can be done
![](images/exsurfaceq43.png)
with Surface1 do
begin
with Elements do
begin
with InsertControl('Forms.CommandButton.1',Null,Null,Null) do
begin
ElementFormat := '"client"';
(IUnknown(Object) as MSForms_TLB.CommandButton2).Caption := 'command';
Height := 32;
Width := 128;
end;
with InsertControl('Forms.CommandButton.1',Null,Null,Null) do
begin
ElementFormat := '"client"';
(IUnknown(Object) as MSForms_TLB.CommandButton2).Caption := 'command';
Height := 32;
Width := 128;
end;
end;
end
|
42
|
How can I host my ActiveX to the surface (method 2)
![](images/exsurfaceq42.png)
with Surface1 do
begin
with Elements do
begin
with InsertControl('Forms.CommandButton.1',Null,Null,Null) do
begin
ElementFormat := '"client"';
(IUnknown(Object) as MSForms_TLB.CommandButton2).Caption := 'command';
Height := 32;
Width := 128;
end;
end;
end
|
41
|
How can I host my ActiveX to the surface (method 1)
![](images/exsurfaceq41.png)
with Surface1 do
begin
with Elements do
begin
with Add('ActiveX',Null,Null) do
begin
Type := EXSURFACELib_TLB.exElementHostControl;
ElementFormat := '"client"';
Control := 'Forms.CommandButton.1';
(IUnknown(Object) as MSForms_TLB.CommandButton2).Caption := 'command';
Height := 32;
Width := 128;
end;
end;
end
|
40
|
How can I define the elements with a solid color on the background
![](images/exsurfaceq40.png)
with Surface1 do
begin
Background[EXSURFACELib_TLB.exElementBorderColor] := $ffffffff;
Background[EXSURFACELib_TLB.exElementStatusColor] := $ffffffff;
Background[EXSURFACELib_TLB.exElementBackColor] := $ff;
with Elements do
begin
Add('Node A',Null,Null);
Add('Node B',OleVariant(96),OleVariant(24));
end;
end
|
39
|
Can I display the status to a different part of the element
![](images/exsurfaceq39.png)
with Surface1 do
begin
Elements.Add('Node',Null,Null).StatusAlign := EXSURFACELib_TLB.exAlignBottom;
end
|
38
|
How can I remove or hide the status part of the event
![](images/exsurfaceq38.png)
// AddElement event - A new element has been added to the surface.
procedure TForm1.Surface1AddElement(ASender: TObject; Element : IElement);
begin
// Element.StatusSize = 0
end;
with Surface1 do
begin
Background[EXSURFACELib_TLB.exElementStatusColor] := $ffffffff;
with Elements do
begin
Add('Node A',Null,Null);
Add('Node B',OleVariant(96),OleVariant(24));
end;
end
|
37
|
How can I change the visual appearance of the border for all elements
![](images/exsurfaceq37.png)
with Surface1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
Background[EXSURFACELib_TLB.exElementBorderColor] := $1000000;
with Elements do
begin
Add('Element+A',Null,Null);
Add('Element+B',OleVariant(96),OleVariant(24));
end;
end
|
36
|
How can I change the color of the border for all elements
![](images/exsurfaceq36.png)
with Surface1 do
begin
Background[EXSURFACELib_TLB.exElementBorderColor] := $ff00;
with Elements do
begin
Add('Element+A',Null,Null);
Add('Element+B',OleVariant(96),OleVariant(24));
end;
end
|
35
|
How can I remove the border for all elements
![](images/exsurfaceq35.png)
with Surface1 do
begin
Background[EXSURFACELib_TLB.exElementBorderColor] := $ffffffff;
with Elements do
begin
Add('Element+A',Null,Null);
Add('Element+B',OleVariant(96),OleVariant(24));
end;
end
|
34
|
How do I change the visual appearance the glpyh that shows when the element is added as a child
![](images/exsurfaceq34.png)
with Surface1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
VisualAppearance.Add(2,'c:\exontrol\images\pushed.ebn');
Background[EXSURFACELib_TLB.exHoverInsertObject] := $1000000;
Background[EXSURFACELib_TLB.exHoverInsertObjectGlyph] := $2000000;
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(96),OleVariant(24));
end;
end
|
33
|
Is it possible to change the color for the glpyh that shows when the element is added as a child
![](images/exsurfaceq33.png)
with Surface1 do
begin
Background[EXSURFACELib_TLB.exHoverInsertObject] := $ff;
Background[EXSURFACELib_TLB.exHoverInsertObjectGlyph] := $ff;
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(96),OleVariant(24));
end;
end
|
32
|
How can I change the color to show a valid link
![](images/exsurfaceq32.png)
with Surface1 do
begin
Background[EXSURFACELib_TLB.exLinkObjectsValidColor] := $ff00;
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(96),OleVariant(24));
end;
end
|
31
|
How can I change the color to show an invalid link
![](images/exsurfaceq31.png)
with Surface1 do
begin
Background[EXSURFACELib_TLB.exLinkObjectsInvalidColor] := $ff00;
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(96),OleVariant(24));
end;
end
|
30
|
How can I disable adding the elements as child of other nodes
with Surface1 do
begin
AllowInsertObject := False;
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(96),OleVariant(24));
end;
end
|
29
|
How can I prevent moving the outgoing /descendents elements when moving an element
with Surface1 do
begin
ShowLinksType := Integer(EXSURFACELib_TLB.exLinkStraight) Or Integer(EXSURFACELib_TLB.exLinkDirect);
AllowMoveDescendents := False;
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(96),OleVariant(24));
end;
with Links do
begin
Add(Surface1.Elements.Item[OleVariant(1)],Surface1.Elements.Item[OleVariant(2)],Null);
end;
end
|
28
|
How can I add programatically a link
![](images/exsurfaceq28.png)
with Surface1 do
begin
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(96),OleVariant(24));
end;
with Links do
begin
Add(Surface1.Elements.Item[OleVariant(1)],Surface1.Elements.Item[OleVariant(2)],Null);
end;
end
|
27
|
How do I prevent adding a link between elements
with Surface1 do
begin
AllowLinkObjects := EXSURFACELib_TLB.exDisallow;
with Elements do
begin
Add('Element <sha ;;0>A',Null,Null);
Add('Element <sha ;;0>B',OleVariant(96),OleVariant(24));
end;
end
|
26
|
How can I hide the 100% button ( zoom ) on the control's toolbar
![](images/exsurfaceq26.png)
with Surface1 do
begin
ToolBarFormat := '-1,100';
end
|
25
|
Is it possible to hide the Home button on the control's toolbar
![](images/exsurfaceq25.png)
with Surface1 do
begin
ToolBarFormat := '-1,101';
end
|
24
|
How can I hide the grid lines, including the axis
![](images/exsurfaceq24.png)
with Surface1 do
begin
ShowGridLines := False;
AxisStyle := EXSURFACELib_TLB.exNoLines;
end
|
23
|
How can I hide the grid lines
![](images/exsurfaceq23.png)
with Surface1 do
begin
ShowGridLines := False;
end
|
22
|
How can I clear the images shown on the control's toolbar
![](images/exsurfaceq22.png)
with Surface1 do
begin
ToolBarReplaceIcon(OleVariant(0),OleVariant(-1));
ToolBarRefresh();
end
|
21
|
How can I replace the default icons shown on the control's toolbar
![](images/exsurfaceq21.png)
with Surface1 do
begin
ToolBarReplaceIcon(OleVariant(0),OleVariant(-1));
ToolBarImages('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
end
|
20
|
How can I replace the default icons shown on the control's toolbar
![](images/exsurfaceq20.png)
with Surface1 do
begin
ToolBarImages('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
ToolBarCaption[100] := '<img>3</img> aka1';
end
|
19
|
How can I add an anchor element to the control's toolbar
![](images/exsurfaceq19.png)
// ToolBarAnchorClick event - Occurs when an anchor element is clicked, on the control's toolbar.
procedure TForm1.Surface1ToolBarAnchorClick(ASender: TObject; AnchorID : WideString;Options : WideString);
begin
with Surface1 do
begin
OutputDebugString( AnchorID );
end
end;
with Surface1 do
begin
ToolBarFormat := '-1,100,101,|,102';
ToolBarCaption[102] := '<a a1>anchor</a>';
end
|
18
|
How can I add a button/image to the control's toolbar
![](images/exsurfaceq18.png)
// ToolBarClick event - Occurs when the user clicks a button in the toolbar.
procedure TForm1.Surface1ToolBarClick(ASender: TObject; ID : Integer;SelectedID : Integer);
begin
with Surface1 do
begin
OutputDebugString( ID );
end
end;
with Surface1 do
begin
ToolBarImages('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
ToolBarFormat := '-1,100,101,102';
ToolBarCaption[102] := '<img>3</img> new';
end
|
17
|
How can I add a button to the control's toolbar
![](images/exsurfaceq17.png)
// ToolBarClick event - Occurs when the user clicks a button in the toolbar.
procedure TForm1.Surface1ToolBarClick(ASender: TObject; ID : Integer;SelectedID : Integer);
begin
with Surface1 do
begin
OutputDebugString( ID );
end
end;
with Surface1 do
begin
ToolBarFormat := '-1,100,101,102';
ToolBarCaption[102] := '<sha ;;0>new';
end
|
16
|
How can I hide the control's toolbar
![](images/exsurfaceq16.png)
with Surface1 do
begin
ToolBarVisible := False;
end
|
15
|
How can I prevent selecting the elements
with Surface1 do
begin
AllowSelectObject := EXSURFACELib_TLB.exDisallow;
AllowSelectObjectRect := EXSURFACELib_TLB.exDisallow;
AllowToggleSelectKey := EXSURFACELib_TLB.exDisallow;
Elements.Add('element',Null,Null);
end
|
14
|
How can I show the selected elements the same as the control has the focus
![](images/exsurfaceq14.png)
with Surface1 do
begin
HideSel := False;
SelectObjectColorInactive := SelectObjectColor;
SelectObjectTextColorInactive := SelectObjectTextColor;
Elements.Add('element',Null,Null).Selected := True;
end
|
13
|
How can I show the selected elements with a different border
![](images/exsurfaceq13.png)
with Surface1 do
begin
VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
HideSel := False;
SelectObjectStyle := EXSURFACELib_TLB.exLinesSolid;
SelectObjectColor := $1000000;
SelectObjectTextColor := RGB(0,0,0);
SelectObjectColorInactive := SelectObjectColor;
SelectObjectTextColorInactive := SelectObjectTextColor;
Elements.Add('element',Null,Null).Selected := True;
end
|
12
|
How can I show the selected elements with a different background color
![](images/exsurfaceq12.png)
with Surface1 do
begin
HideSel := False;
SelectObjectStyle := EXSURFACELib_TLB.exNoLines;
SelectObjectColor := RGB(255,0,0);
SelectObjectTextColor := RGB(255,255,255);
SelectObjectColorInactive := SelectObjectColor;
SelectObjectTextColorInactive := SelectObjectTextColor;
Elements.Add('element',Null,Null).Selected := True;
end
|
11
|
Is it possible to add an inner control on the surface
![](images/exsurfaceq11.png)
// OleEvent event - Occurs once an inside control fires an event.
procedure TForm1.Surface1OleEvent(ASender: TObject; Element : IElement;Ev : IOleEvent);
begin
with Surface1 do
begin
OutputDebugString( Ev );
end
end;
with Surface1 do
begin
with Elements do
begin
with Add('activex hosting',Null,Null) do
begin
Type := EXSURFACELib_TLB.exElementHostControl;
Control := 'Forms.CommandButton.1';
Caption := 'Command Button';
Height := 64;
Width := 128;
ElementFormat := '14;"caption"/"client"';
CaptionAlign := EXSURFACELib_TLB.exTopCenter;
end;
end;
end
|
10
|
How can I make the control read-only
// LayoutStartChanging event - Occurs when the control's layout is about to be changed.
procedure TForm1.Surface1LayoutStartChanging(ASender: TObject; Operation : LayoutChangingEnum);
begin
with Surface1 do
begin
OutputDebugString( Operation );
CancelLayoutChanging();
end
end;
with Surface1 do
begin
with Elements do
begin
Add('new element',Null,Null);
end;
end
|
9
|
How can I handle clicking a picture on the element
![](images/exsurfaceq9.png)
// HandCursorClick event - The uses clicks a part of the element that shows the had cursor.
procedure TForm1.Surface1HandCursorClick(ASender: TObject; Element : IElement;Hit : ShowHandCursorOnEnum;Key : OleVariant);
begin
with Surface1 do
begin
OutputDebugString( Key );
end
end;
with Surface1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
with Elements do
begin
with Add('new element',Null,Null) do
begin
CaptionAlign := EXSURFACELib_TLB.exTopRight;
PicturesAlign := EXSURFACELib_TLB.exTopLeft;
ShowHandCursorOn := Integer(EXSURFACELib_TLB.exShowHandCursorAnchorAll) Or Integer(EXSURFACELib_TLB.exShowHandCursorPictures) Or Integer(EXSURFACELib_TLB.exShowHandCursorIcon) Or Integer(EXSURFACELib_TLB.exShowHandCursorPicture);
Pictures := '0,1,2';
end;
end;
end
|
8
|
How can I show the hand cursor when user hovers the element's image
![](images/exsurfaceq8.png)
// HandCursorClick event - The uses clicks a part of the element that shows the had cursor.
procedure TForm1.Surface1HandCursorClick(ASender: TObject; Element : IElement;Hit : ShowHandCursorOnEnum;Key : OleVariant);
begin
with Surface1 do
begin
OutputDebugString( Key );
end
end;
with Surface1 do
begin
Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' +
'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' +
'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' +
'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
with Elements do
begin
with Add('new element',Null,Null) do
begin
CaptionAlign := EXSURFACELib_TLB.exTopRight;
PicturesAlign := EXSURFACELib_TLB.exTopLeft;
ShowHandCursorOn := Integer(EXSURFACELib_TLB.exShowHandCursorAnchorAll) Or Integer(EXSURFACELib_TLB.exShowHandCursorPictures) Or Integer(EXSURFACELib_TLB.exShowHandCursorIcon) Or Integer(EXSURFACELib_TLB.exShowHandCursorPicture);
Pictures := '0,1,2';
end;
end;
end
|
7
|
How can I show the hand cursor when user hovers the element's checkbox
![](images/exsurfaceq7.png)
with Surface1 do
begin
with Elements do
begin
with Add('new element',Null,Null) do
begin
CaptionAlign := EXSURFACELib_TLB.exTopRight;
CheckBoxAlign := EXSURFACELib_TLB.exTopLeft;
ShowCheckBox := True;
ShowHandCursorOn := Integer(EXSURFACELib_TLB.exShowHandCursorAnchorAll) Or Integer(EXSURFACELib_TLB.exShowHandCursorCheck);
end;
end;
end
|
6
|
How can I remove the status part for all elements
![](images/exsurfaceq6.png)
// AddElement event - A new element has been added to the surface.
procedure TForm1.Surface1AddElement(ASender: TObject; Element : IElement);
begin
// Element.StatusSize = 0
end;
with Surface1 do
begin
Background[EXSURFACELib_TLB.exElementStatusColor] := $ffffffff;
Elements.Add('new element',Null,Null);
end
|
5
|
How can I remove the border for all elements
![](images/exsurfaceq5.png)
with Surface1 do
begin
Background[EXSURFACELib_TLB.exElementBorderColor] := $ffffffff;
Elements.Add('new element',Null,Null);
end
|
4
|
How do I edit the element's caption once the user creates the element
![](images/exsurfaceq4.png)
// CreateElement event - The user creates at runtime a new element.
procedure TForm1.Surface1CreateElement(ASender: TObject; Element : IElement);
begin
// Element.Edit(0)
// Element.AutoSize = True
end;
|
3
|
How can I align the element's checkbox next to the text
![](images/exsurfaceq3.png)
with Surface1 do
begin
BeginUpdate();
with Elements do
begin
with Add('text',Null,Null) do
begin
ShowCheckBox := True;
CaptionAlign := EXSURFACELib_TLB.exTopRight;
CheckBoxAlign := EXSURFACELib_TLB.exTopLeft;
end;
end;
EndUpdate();
end
|
2
|
How can I assign a check-box to all elements
![](images/exsurfaceq2.png)
// AddElement event - A new element has been added to the surface.
procedure TForm1.Surface1AddElement(ASender: TObject; Element : IElement);
begin
// Element.ShowCheckBox = True
end;
with Surface1 do
begin
BeginUpdate();
with Elements do
begin
Add('',OleVariant(-24),OleVariant(-24));
Add('',Null,Null).Checked := EXSURFACELib_TLB.exChecked;
end;
Home();
EndUpdate();
end
|
1
|
How do I change the control's background color
![](images/exsurfaceq1.png)
with Surface1 do
begin
BackColor := RGB(240,240,240);
end
|